<?xml version='1.0' encoding='UTF-8' ?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"
      xmlns:ui="http://xmlns.jcp.org/jsf/facelets"
      xmlns:p="http://primefaces.org/ui"
      xmlns:f="http://xmlns.jcp.org/jsf/core"
      xmlns:h="http://xmlns.jcp.org/jsf/html">
    <body>
        <ui:composition template="./common/template.xhtml">
            
            <ui:define name="content">
                <h:form>
                    <h:panelGroup layout="block">                      
                            <p:panelGrid columns="2">  
                                <f:facet name="header">  
                                    Login  
                                </f:facet>  
                                <h:outputLabel for="username" value="Username: *" />  
                                <p:inputText id="username" required="true" requiredMessage="No username" value="#{accountController.current.userName}" label="username" />  

                                <h:outputLabel for="password" value="Password: *" />  
                                <p:password id="password" value="#{accountController.current.password}" requiredMessage="No password" required="true" label="password"/>  

                                <f:facet name="footer">  
                                    <p:messages id="messages" autoUpdate="true" closable="true" />  
                                    <p:commandButton actionListener="#{accountController.login()}" value="Login" icon="ui-icon-check" style="margin:0"/>  
                                    <p:commandButton type="button" value="Cancel" icon="ui-icon ui-icon-close" style="margin:0"/>  
                                </f:facet>                              
                            </p:panelGrid>                       
                    </h:panelGroup>
                </h:form>
            </ui:define>
        </ui:composition>
    </body>
</html>
